<#assign pageName="用户登录">
<#include "/templates/taglibs.ftl" />
<@override name="head-styles">
    <style>
        #content{
            background: #FFF;
        }
    </style>
</@override>
<@override name="page-content">
<#if errorMsg?has_content>
    <div class="access">
        <div class="access__img-block">
            <div class="access__img" style='background-image:url("${contextPath}/assets/images/acError.svg");'></div>
        </div>
        <div class="access__cont">
            <h1 class="access__cont-title">授权访问错误</h1>
            <div class="access__cont-desc">
                <span class="blue">${errorMsg!'请求不合法'}</span>
            </div>
       </div>
    </div>
<#else>
  <div class="wrap">
      <div class="signdiv sign-ad layui-hide-xs">
          <img src="${contextPath}/assets/images/login_ad.png" />
      </div>
      <div class="signdiv sign-login">
          <div class="sign-title">
            <div class="codelogin">
                <div class="active">密码登录</div>
            </div>
          </div>
          <div class="sign-body">
               <div class="sign-con codelogin">
                   <form class="layui-form" method="post">
                       <div class="layui-form-item">
                          <input type="text" id="username" name="username" value="${Session['SPRING_SECURITY_LAST_USERNAME']}"  autocomplete="off"
                          onkeyup="this.value=this.value.replace(/[\u4e00-\u9fa5]/g,'')"  lay-verify="required|username" lay-verType="tips" 
                          lay-reqText="请填写登录名/手机号/电子邮箱" placeholder="登录名/手机号/电子邮箱" class="layui-input">
                      </div>
                      <div class="layui-form-item">
                          <input type="password" id="pubword" name="pubword" lay-verify="required" lay-verType="tips" lay-reqText="请填写账户密码" autocomplete="off" placeholder="账户密码" class="layui-input" maxlength=32>
                          <i class="layui-icon layui-extend layui-extend-icon_eye_off"></i>
                      </div>
                      <div class="layui-form-item">
                            <input type="text" id="validateCode" name="validateCode" lay-verify="required" lay-verType="tips" lay-reqText="请填写验证码" autocomplete="off" placeholder="验证码" class="layui-input">
                            <a href="javascript:;" onclick="jQuery('#vcImg').attr('src','${rc.getContextPath()}/validatecode?randomStr='+randomString(6));">
                                <img id="vcImg" class="vcImg" src="" title="点击换一张">
                            </a>
                      </div>
                      <div class="layui-form-item">
                          <div class="sign-tip"></div>
                      </div>
                      <div class="layui-form-item">
                          <input type="hidden" id="password" name="password" value="" />
                          <input type="hidden" id="pubkey" name="pubkey"  value="${publicKey}" />
                          <input type="button" value="登录" lay-submit="" lay-filter="codelogin"  class="layui-btn layui-btn-normal sign-btn codelogin">
                      </div>
                      <div class="layui-form-item">
                          <div class="sign-more">
                              <a href="#">新用户注册</a>
                              <div class="beg-pull-right beg-remember">
                                  <a href="javascript:;" class="">忘记密码</a>
                                  <ul class="dropdown-menu">
                                    <li><a href="#">用手机号重置密码</a></li>
                                    <li><a href="#">用邮箱重置密码</a></li>
                                  </ul>
                               </div>
                          </div>
                      </div>
                      </form>
                  </div>
                  <input type="hidden" id="action" name="action" value="login" /> 
             </div>
         </div>
    </div>
</#if>
</@override>
<@override name="page-scripts">
    <script type="text/javascript" src="${contextPath}/assets/js/jquery.min.js"></script>
    <script type="text/javascript" src="${contextPath}/assets/js/jsencrypt.min.js"></script>
    <script type="text/javascript" src="${contextPath}/assets/js/base64.min.js"></script>
    <script type="text/javascript" src="${contextPath}/assets/js/oauth.js"></script>
</@override>
<@extends name="/layout/baseoauthpage.html"/> 
